import {
    getIperList,
    searchIper,
    addIper,
    editIper,
    deleteIper,
    getIperWaitList,
    auditIper,
    getIperById,
    pushHomeIper,
    unPushHomeIper,
    recommendIper,
    unRecommendIper,
    cleExhibitorIper,
    uncleExhibitorIper,
    sendIperMail,
} from '../api/iper'

export const actions = {
    // 获取IP方数据 多条件
    async getIperList({ }, id, data) {
        return await getIperList(id, data)
    },
    // 根据企业名称搜索IP方
    async searchIper({ }, id, data) {
        return await searchIper(id, data)
    },
    // 添加IP方
    async addIper({ }, id, data) {
        return await addIper(id, data)
    },
    // 编辑IP方
    async editIper({ }, id, data) {
        return await editIper(id, data)
    },
    // 删除IP方
    async deleteIper({ }, id, data) {
        return await deleteIper(id, data)
    },
    // 获取IP方数据 待审核
    async getIperWaitList({ }, id, data) {
        return await getIperWaitList(id, data)
    },
    // 审批IP方
    async auditIper ({ }, id, data) {
        return await auditIper(id, data)
    },
    //根据id获取IP方
    async getIperById({ }, id, data) {
        return await getIperById(id, data)
    },

    // 推送首页
    async pushHomeIper({ }, id, data) {
        return await pushHomeIper(id, data)
    },
    // 取消推送首页
    async unPushHomeIper({ }, id, data) {
        return await unPushHomeIper(id, data)
    },

    // 推荐
    async recommendIper({ }, id, data) {
        return await recommendIper(id, data)
    },
    // 取消推荐
    async unRecommendIper({ }, id, data){
        return await unRecommendIper(id, data)
    },
    // 设置CLE展商
    async cleExhibitorIper({ }, id, data) {
        return await cleExhibitorIper(id, data)
    },
    // 取消CLE展商
    async uncleExhibitorIper({ }, id, data) {
        return await uncleExhibitorIper(id, data)
    },

    // 发送IP方邮件
    async sendIperMail({ }, id, data) {
        return await sendIperMail(id, data)
    }

}
